06. Uniform Distribution

Uniform Distribution

Question:

Start Quiz:

# Modify the empty list, p, so that it becomes a UNIFORM probability
# distribution over five grid cells, as expressed in a list of 
# five probabilities.

p = []

print p

User's Answer:

(Note: The answer done by the user is not guaranteed to be correct)

# Modify the empty list, p, so that it becomes a UNIFORM probability
# distribution over five grid cells, as expressed in a list of 
# five probabilities.

p = [1.0/5.0 for i in range(0,5)]

print p
Solution: